package com.ljf.config.dto.command;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ljf.common.validation.AddGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 发号器配置明细--新增修改  config_base_impulse_sender_detail
 *
 * @author LJF
 * @since 2025-01-09
 */
@Data
@ApiModel("发号器配置明细--新增修改")
public class ConfigBaseImpulseSenderDetailCommand implements Serializable {

    @JsonProperty("sort")
    @ApiModelProperty(value = "排序")
    @NotNull(message = "排序不能为空", groups = AddGroup.class)
    private Integer sort;

    @JsonProperty("type")
    @ApiModelProperty(value = "类型")
    @NotNull(message = "类型不能为空", groups = AddGroup.class)
    private Integer type;

    @JsonProperty("value")
    @ApiModelProperty(value = "值")
    @Length(message = "值不能超过20个字符", max = 20)
    @NotEmpty(message = "值不能为空", groups = AddGroup.class)
    private String value;

}
